﻿@model IEnumerable<Citi.ReportManager.WebUi.Models.HighlightedReportModel>
<div style="margin-right: 6px;">
    <table class="table table-bordered table-striped">
        <tr>
            <th>
                Name
            </th>
            @if (Model.Any() && Model.First().ShowRequestDate)
            {
                <th>
                    Download Date
                </th>
            }
            <th>
                Size
            </th>
        </tr>
        @if (Model.Any())
        {
            foreach (var item in Model)
            {
            <tr>
                <td>
                    <img src="@Url.Content(string.Format("~/Content/Images/Files/{0}", item.Icon))" alt="File type" style="width: 16px"/>
                    &nbsp;
                    @Html.ActionLink(item.ReportName, "Download", "Report", new { categoryId = item.CategoryId, folder = item.ReportPath }, null)
                </td>
                @if(item.ShowRequestDate)
                {
                    <td>@item.RequestDate.ToString("HH:mm dd/MM/yy")</td>
                }
                <td>@item.Size.ToString("#0.00") MB
                </td>
            </tr>
            }
        }
        else
        {
            <tr>
                <td colspan="2">
                    No highlighted reports
                </td>
            </tr>
        }
    </table>
</div>
